package com.example.heuristicallysearchalgorithm49;

import lombok.Getter;
import lombok.Setter;

/**
 * 节点
 * @auther lijiewei
 * @date 2022/9/26 15:53
 */
@Setter
@Getter
public class Node {

    //顶点编号
    private int id;
    //从起始顶点到这个顶点的距离
    private int dist;

    public int f; // 新增：f(i)=g(i)+h(i)
    public int x, y; // 新增：顶点在地图中的坐标（x, y）

    public Node() {
    }

    public Node(int id, int x, int y) {
        this.id = id;
        this.x = x;
        this.y = y;
        this.f = Integer.MAX_VALUE;
        this.dist = Integer.MAX_VALUE;
    }

}
